3.7.100 \(\int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx\) [700]

Optimal. Leaf size=187 \[ \frac {F_1\left (1+n;\frac {2+m}{2},\frac {2+m}{2};2+n;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {2+m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {2+m}{2}}}{b f (1+n)} \]

[Out]

AppellF1(1+n,1+1/2*m,1+1/2*m,2+n,(a+b*tan(f*x+e))/(a-(-b^2)^(1/2)),(a+b*tan(f*x+e))/(a+(-b^2)^(1/2)))*cos(f*x+
e)^2*(d*cos(f*x+e))^m*(a+b*tan(f*x+e))^(1+n)*(1+(-a-b*tan(f*x+e))/(a-(-b^2)^(1/2)))^(1+1/2*m)*(1+(-a-b*tan(f*x
+e))/(a+(-b^2)^(1/2)))^(1+1/2*m)/b/f/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3596, 3593, 774, 138} \begin {gather*} \frac {\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {m+2}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {m+2}{2}} (a+b \tan (e+f x))^{n+1} F_1\left (n+1;\frac {m+2}{2},\frac {m+2}{2};n+2;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{b f (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x])^n,x]

[Out]

(AppellF1[1 + n, (2 + m)/2, (2 + m)/2, 2 + n, (a + b*Tan[e + f*x])/(a - Sqrt[-b^2]), (a + b*Tan[e + f*x])/(a +
 Sqrt[-b^2])]*Cos[e + f*x]^2*(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x])^(1 + n)*(1 - (a + b*Tan[e + f*x])/(a - Sq
rt[-b^2]))^((2 + m)/2)*(1 - (a + b*Tan[e + f*x])/(a + Sqrt[-b^2]))^((2 + m)/2))/(b*f*(1 + n))

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 774

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[(a + c*x^
2)^p/(e*(1 - (d + e*x)/(d + e*(q/c)))^p*(1 - (d + e*x)/(d - e*(q/c)))^p), Subst[Int[x^m*Simp[1 - x/(d + e*(q/c
)), x]^p*Simp[1 - x/(d - e*(q/c)), x]^p, x], x, d + e*x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a
*e^2, 0] &&  !IntegerQ[p]

Rule 3593

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[d^(2*
IntPart[m/2])*((d*Sec[e + f*x])^(2*FracPart[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2])), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rule 3596

Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(d*Co
s[e + f*x])^m*(d*Sec[e + f*x])^m, Int[(a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e,
f, m, n}, x] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x))^n \, dx\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int (a+x)^n \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left (\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\frac {b^2}{\sqrt {-b^2}}}\right )^{1+\frac {m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\frac {b^2}{\sqrt {-b^2}}}\right )^{1+\frac {m}{2}}\right ) \text {Subst}\left (\int x^n \left (1-\frac {x}{a-\sqrt {-b^2}}\right )^{-1-\frac {m}{2}} \left (1-\frac {x}{a+\sqrt {-b^2}}\right )^{-1-\frac {m}{2}} \, dx,x,a+b \tan (e+f x)\right )}{b f}\\ &=\frac {F_1\left (1+n;\frac {2+m}{2},\frac {2+m}{2};2+n;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {2+m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {2+m}{2}}}{b f (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 22.25, size = 365, normalized size = 1.95 \begin {gather*} \frac {2 (a-i b) (a+i b) (2+n) F_1\left (1+n;1+\frac {m}{2},1+\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \cos (e+f x) (d \cos (e+f x))^m (a \cos (e+f x)+b \sin (e+f x)) (a+b \tan (e+f x))^n}{b f (1+n) \left (2 \left (a^2+b^2\right ) (2+n) F_1\left (1+n;1+\frac {m}{2},1+\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(2+m) \left ((a-i b) F_1\left (2+n;1+\frac {m}{2},2+\frac {m}{2};3+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(a+i b) F_1\left (2+n;2+\frac {m}{2},1+\frac {m}{2};3+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )\right ) (a+b \tan (e+f x))\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x])^n,x]

[Out]

(2*(a - I*b)*(a + I*b)*(2 + n)*AppellF1[1 + n, 1 + m/2, 1 + m/2, 2 + n, (a + b*Tan[e + f*x])/(a - I*b), (a + b
*Tan[e + f*x])/(a + I*b)]*Cos[e + f*x]*(d*Cos[e + f*x])^m*(a*Cos[e + f*x] + b*Sin[e + f*x])*(a + b*Tan[e + f*x
])^n)/(b*f*(1 + n)*(2*(a^2 + b^2)*(2 + n)*AppellF1[1 + n, 1 + m/2, 1 + m/2, 2 + n, (a + b*Tan[e + f*x])/(a - I
*b), (a + b*Tan[e + f*x])/(a + I*b)] + (2 + m)*((a - I*b)*AppellF1[2 + n, 1 + m/2, 2 + m/2, 3 + n, (a + b*Tan[
e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)] + (a + I*b)*AppellF1[2 + n, 2 + m/2, 1 + m/2, 3 + n, (a +
 b*Tan[e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)])*(a + b*Tan[e + f*x])))

________________________________________________________________________________________

Maple [F]
time = 0.36, size = 0, normalized size = 0.00 \[\int \left (d \cos \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(f*x+e))^m*(a+b*tan(f*x+e))^n,x)

[Out]

int((d*cos(f*x+e))^m*(a+b*tan(f*x+e))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

integrate((d*cos(f*x + e))^m*(b*tan(f*x + e) + a)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

integral((d*cos(f*x + e))^m*(b*tan(f*x + e) + a)^n, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \cos {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )^{n}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))**m*(a+b*tan(f*x+e))**n,x)

[Out]

Integral((d*cos(e + f*x))**m*(a + b*tan(e + f*x))**n, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cos(f*x+e))^m*(a+b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((d*cos(f*x + e))^m*(b*tan(f*x + e) + a)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\cos \left (e+f\,x\right )\right )}^m\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cos(e + f*x))^m*(a + b*tan(e + f*x))^n,x)

[Out]

int((d*cos(e + f*x))^m*(a + b*tan(e + f*x))^n, x)

________________________________________________________________________________________